<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ include file="../includes/common.jsp" %>
	<c:if test="${not empty articleComments }">
	<div class="block comment">
		<h3>最新评论</h3>
       	<ul>
           	<c:forEach items="${articleComments}" var="v" varStatus="vst">
				<li class="new">${v.author.name }  评论道：<br> 
				<a title="${v.author.name }:${v.entity.name}" href="/article/${v.entity.uid }.htm#comment-${v.uid}">				
					<c:set value="${v.comment }" var="comment"></c:set>
					<c:set value="${fn:split(v.comment,'</blockquote>') }" var="comments"></c:set>
					<c:if test="${fn:length(comments) > 1 }">
						<c:set value="${comments[fn:length(comments)-1] }" var="comment"></c:set>
					</c:if>				  
					<c:choose>
					    <c:when test="${fn:length(comment) > 50}">${fn:substring(comment, 0, 50)} [...]</c:when>
				    	<c:otherwise>${comment}</c:otherwise>
					</c:choose>						
				</a>
				</li>
			</c:forEach>
        </ul>
    </div>        
    </c:if>
